import React from "react";
import { Switch, Route, Redirect } from "react-router-dom";
import Addtag from "./Addtag";
import Taglist from "./Taglist";

function Default(props) {
  const baseUrl = props.match.path; // /manage/article
  return (
    <div>
      <Switch>
        <Route path={baseUrl + "/taglist"} component={Taglist} />
        <Route path={baseUrl + "/addtag"} component={Addtag} />
        <Redirect exact from={baseUrl} to={baseUrl + "/taglist"} />
      </Switch>
    </div>
  );
}

export default Default;
